﻿@model AdminLite.Models.EditUserViewModel

@{
    ViewBag.Title = "用户管理";
}
    <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">用户编辑</h3>
            </div>
            @using (Html.BeginForm())
            {
                @Html.AntiForgeryToken()

                <div class="form-horizontal">
                    @Html.ValidationSummary(true)
                    @Html.HiddenFor(model => model.Id)

                    <div class="form-group">
                        @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
                        <div class="col-md-4">
                            @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.Email)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(model => model.UserName, new { @class = "control-label col-md-2" })
                        <div class="col-md-4">
                            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(model => model.PhoneNumber, new { @class = "control-label col-md-2" })
                        <div class="col-md-4">
                            @Html.TextBoxFor(m => m.PhoneNumber, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.Label("角色", new { @class = "control-label col-md-2" })
                        <span class="col-md-4">
                            @foreach (var item in Model.RolesList)
                            {
                                <input type="checkbox" name="SelectedRole" value="@item.Value" checked="@item.Selected" class="checkbox-inline" />
                                @Html.Label(item.Value, new { @class = "control-label" })
                            }
                        </span>
                    </div>

                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-4">
                            <input type="submit" value="保存" class="btn btn-primary"/>
                            @Html.ActionLink("返回", "Index",new {},new {@class= "btn btn-default" })
                        </div>
                    </div>
                </div>
            }
        </div>
